Consider an experiment designed to find out whether or not feedback-delay impairs criterion learning? What is criterion learning? Here is an example trial:
In this case, thin bars belong to category A, and thick bars belong to category B. But where exactly is the category boundary (i.e., criterion) that separates thick from thin? Criterion learning is the process that allows our brains to figure this out. Next, you will perform a cursory analysis on the data from this experiment.
Read https://crossley.github.io/cogs2020/data/criterion_learning/crit_learn.csv into a data.table and store the result in a variable named ans_1a.
The resulting data.table contains the following columns:
t: Trial number across the entire experiment.
t_prob: Trial number per problem.
sub: Subject identifier (i.e., different numbers correspond to different subjects).
cnd: Condition identifier.
prob_num: Problem number (gets increased by 1 every time a participant solves a problem).
t2c: Trials to criterion (i.e., the number of trials it took a participant to solve a particular problem.)
exp: Experiment indicator. Overall, this study was broken down into two experiments – one using sine-wave grating stimuli and the other using a different type of stimuli.
nps: Number of problems solved. This is the same as max(prob_num)
Select only rows for which cnd == Delay or for which cnd == Long ITI and store the result in a variable named ans_1b.
Starting with ans_1b, create a new data.table that contains only a cnd, sub and mean t2c per cnd per sub, and store the result in a variable named ans_1c.
Make sure that your resulting data.table has only cnd, sub and t2c columns and nothing more. Any columns named V1 etc. will lead to this question being marked incorrect).
Also make sure that your resulting data.frame only has one observation per subject. Failure to do so will lead to this question being marked incorrect.
Use ans_1c and ggplot to reproduce the following plot exactly and store the resulting ggplot object in a variable named ans_1d.
Consider an experiment in which a set of rats run through a set of mazes some number of times each. The researchers running this experiment are interested in how quickly rats can run these mazes, and so they record the time in seconds each rat takes to complete each run of each maze. Next, you will perform a cursory analysis on the data from this experiment.
Read https://crossley.github.io/cogs2020/data/maze/maze.csv into a data.table and store the result in a variable named ans_2a.
The resulting data.table contains the following columns:
rat: Rat identifier (i.e., different numbers correspond to different rats).
maze: Maze identifier (i.e., different numbers correspond to different mazes).
run: Run identifier (i.e., different numbers correspond to different runs).
time: The time in seconds taken to complete the maze.
rat and maze are both categorical experimental factors, but they are currently coded as numeric. Inside the data.table, change the coding of rat and maze to factor and store the result in a variable named ans_2b.
Starting with ans_2b, create a new data.table that contains only a maze, rat and mean time per maze per rat, and store the result in a variable named ans_2c.
Make sure that your resulting data.table has only maze, rat and time columns and nothing more. Any columns named V1 etc. will lead to this question being marked incorrect).
Also make sure that your resulting data.frame only has one observation per rat per maze. Failure to do so will lead to this question being marked incorrect.
Use ans_2c and ggplot to reproduce the following plot exactly and store the resulting ggplot object in a variable named ans_2d.
Consider an experiment designed to discover differences in the sensorimotor learning abilities of expert minimally invasive surgeons as compared to healthy college aged controls. On each trial, participants simply rested their hand in the middle of a desk, and then tried to move their hand quickly and accurately to a visual target somewhere on a circle centred at their hand position and with a radius of about 8 cm. The data file can be found here at https://crossley.github.io/cogs2020/data/mis/mis_data.csv and contains the following columns:
subject: Anonymous subject IDgroup: Indicates college student or surgeonphase: Indicates the phase of the experimenttrial: Trial numbertarget: The visual target was reached to for this trialerror: The mismatch between the centre of the target and the final hand positionmovement_time: How long the movement lastedreaction_time: How long until the movement beganpeak_velocity: The maximum velocity reached during the reachhand_angle: The angle of the hand movementCompute the mean hand_angle per group per trial and store the result in a variable named ans_3a.
Use ans_3a and ggplot to reproduce the following plot exactly and store the resulting ggplot object in a variable named ans_3b.
Consider a magnetoencephalography (MEG) experiment that collected data from a single participant while they performed a category learning experiment (see problem 1 for example stimuli and an example trial). On each trial of the category learning experiment, the participant viewed a circular sine wave grating, and had to push a button to indicate whether they believed the stimulus belonged to category A or category B.
MEG is used to record the time-series of magnetic and electric potentials at the scalp, which are generated by the activity of neurons. There are many sensors, each configured to pick up signal from a different position on the scalp. This is shown in the following figure (the text labels indicate the channel name and are placed approximately where the MEG sensor is located on a real head).
The data file that we will be working with is arranged into epochs aligned to stimulus presentation. This means that every time a stimulus is presented we say that an epoch has occurred. We then assign a time of \(t=0\) to the exact moment the stimulus appeared. We then typically look at the neural time series from just before the stimulus appeared to a little while after the stimulus has appeared. For this data, each epoch starts 0.1 seconds before stimulus onset, and concludes 0.3 seconds after stimulus onset. The following figure shows the MEG signal at every sensory location across the entire scalp for 5 time points within this \([-0.1s, 0.3s]\) interval.
The data can be located athttps://crossley.github.io/cogs2020/data/eeg/epochs.txt and contains the following columns:
The time column contains times in seconds relative to stimulus onset. Stimulus onset always occurs at \(0\) seconds.
The condition column indicates which category the stimulus belonged to for the given epoch. We won’t make use of this column here, and we will remove it below.
The epoch column is the epoch number. You can think of this like we have usually thought of trial columns in examples throughout the course.
The many different MEG xyz columns contain the actual neural time series signals for each sensor. See the above figure for how these column names map onto scalp positions.
Load this data into a data.table, remove column V1, and convert condition from an int to a factor. Store the result in variable named ans_4a.
Convert ans_4a to long format using the melt() function. Use time, epoch, and condition as id.vars and store the result in a variable named ans_4b.
Filter ans_4b such that it only contains rows corresponding to the MEG 001 channel and store the result in a variable named ans_4c.
From ans_4c compute the mean MEG signal separately per condition and per time and store the result in a variable named ans_4d.
Use ggplot to reproduce the following plot exactly and store the resulting ggplot object in a variable named ans_4e.